﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Flight
{
    public static class Extension
    {
        public static float distTo(this Vector3 from, Vector3 to)
        {
            return (to - from).Length();
        }
    }
    public static class Sphere
    {
        public static Vector3 radians(float theta, float phi)
        {
            return new Vector3(
                (float)(Math.Cos(theta) * Math.Cos(phi)),
                (float)(Math.Sin(theta) * Math.Cos(phi)),
                (float)Math.Sin(phi));
        }
        public static Vector3 degrees(float theta, float phi)
        {
            return Sphere.radians(MathHelper.ToRadians(theta), MathHelper.ToRadians(phi));
        }
    }
}
